<!DOCTYPE html>
<html>
<head>
    <style type="text/css">
        * {
            font-family: verdana,'Microsoft YaHei',Consolas,'Deja Vu Sans Mono','Bitstream Vera Sans Mono';
            font-size: 12px;
        }
        .succ {
            color: green;
        }
        .fail {
            color: red;
        }
        #t tr th {
            width: 80px;
            text-align: right;
        }
    </style>
</head>
<body>
<table id="t">
    {{if .IsUpgrade}}
        <tr>
            <td colspan="2" style="color: red;font-weight: bold;" align="center">
                报警已升级
                <hr style="border:1px solid #ff0000;">
            </td>
        </tr>
    {{end}}

    <tr>
        <th>事件状态：</th>
        {{if .IsAlert}}
            <td class="fail">{{.Status}}</td>
        {{else}}
            <td class="succ">{{.Status}}</td>
        {{end}}
    </tr>
    <tr>
        <th>策略名称：</th>
        <td>{{.Sname}}</td>
    </tr>
    <tr>
        <th>endpoint：</th>
        <td>{{.Endpoint}}</td>
    </tr>
    <tr>
        <th>挂载节点：</th>
        <td>
            {{range .Bindings}}
                {{.}}<br />
            {{end}}
        </td>
    </tr>
    <tr>
        <th>metric：</th>
        <td>{{.Metric}}</td>
    </tr>
    <tr>
        <th>tags：</th>
        <td>{{.Tags}}</td>
    </tr>
    <tr>
        <th>当前值：</th>
        <td>{{.Value}}</td>
    </tr>
    <tr>
        <th>报警说明：</th>
        <td>
            {{.Info}}
        </td>
    </tr>
    <tr>
        <th>触发时间：</th>
        <td>
            {{.Etime}}
        </td>
    </tr>
    <tr>
        <th>报警详情：</th>
        <td>{{.Elink}}</td>
    </tr>
    <tr>
        <th>报警策略：</th>
        <td>{{.Slink}}</td>
    </tr>
    {{if .Clink}}
        <tr>
            <th>认领报警：</th>
            <td>{{.Clink}}</td>
        </tr>
    {{end}}
</table>
</body>
</html>
